package cn.bugstack.domain.strategy.model.entity;

import cn.bugstack.domain.strategy.model.valobj.RuleLogicCheckTypeVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Title: RuleActionEntity
 * @Author tong
 * @Package cn.bugstack.domain.strategy.model.entity
 * @Date 2025/6/1 10:26
 * @description: 规则动作实体
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RuleActionEntity<T extends RuleActionEntity.RaffleEntity> {

    private String code = RuleLogicCheckTypeVO.ALLOW.getCode();
    private String info = RuleLogicCheckTypeVO.ALLOW.getInfo();

    private String ruleModel;

    private T data;

    static public class RaffleEntity {
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    static public class RaffleBeforeEntity extends RaffleEntity {
        /**
         * 策略ID
         */
        private Long strategyId;
        /**
         * 抽奖奖品ID【规则类型为策略，则不需要奖品ID】
         */

        private Long awardId;
        /**
         * 权重值key：抽奖时选择权重抽奖
         */
        private String ruleWeightValueKey;
    }

    static public class RaffleCenterEntity extends RaffleEntity {

    }

    static public class RaffleAfterEntity extends RaffleEntity {

    }
}
